home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue39 / Clinic / AddItm3U.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-07-15  |  809 b   |  43 lines

  1. unit AddItm3U;
  2.  
  3. interface
  4.  
  5. uses
  6.   WinProcs, WinTypes, Classes, Graphics, Forms, Controls, StdCtrls;
  7.  
  8. type
  9.   TForm1 = class(TForm)
  10.     btnCreate: TButton;
  11.     edtGroup: TEdit;
  12.     edtDesc: TEdit;
  13.     edtPath: TEdit;
  14.     edtParams: TEdit;
  15.     Label1: TLabel;
  16.     Label3: TLabel;
  17.     Label4: TLabel;
  18.     Label5: TLabel;
  19.     Label6: TLabel;
  20.     procedure btnCreateClick(Sender: TObject);
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. uses
  31.   AdItm3U2, Dialogs, SysUtils;
  32.  
  33. procedure TForm1.btnCreateClick(Sender: TObject);
  34. begin
  35.   if edtGroup.Text = '' then
  36.     MessageDlg('Group name cannot be blank.', mtError, [mbOK], 0)
  37.   else
  38.     CreateShortCut(edtGroup.Text, 'Shortcut to ' + edtDesc.Text,
  39.       edtPath.Text, edtParams.Text, '', '', 0, False)
  40. end;
  41.  
  42. end.
  43.